Store adapter — Magento 2¶
The adapter object contains properties for connecting to the Magento 2 API.
Parent object: a store with property "platform" : "magento2"
Required properties¶
The following adapter properties are required for Magento 2 stores.
access_token¶
| Property | access_token |
|---|---|
| Name | Magento 2 Access Token |
| Description | Found in Magento admin panel > System > Extensions > Integrations |
| Data type | string |
| Required? | Yes |
store_url¶
| Property | store_url |
|---|---|
| Name | Magento 2 Store URL |
| Data type | string |
| Required? | Yes |
Optional properties¶
The following adapter properties are optional for Magento 2 stores.
import_status¶
| Property | import_status |
|---|---|
| Name | Order Import Status |
| Description | Status of orders to import |
| Data type | string |
| Default | "processing" |
store_view_code¶
| Property | store_view_code |
|---|---|
| Name | Store View Code |
| Description | For multi-store installations. Only orders from the specified store will be imported |
| Data type | string |
Example¶
Example: create a new Magento 2 store
curl -X POST \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
https://api.getdropstream.com/stores \
-d @- <<EOF
{ "customer_id": "3775",
"name": "Your Magento 2 Store",
"platform": "magento2",
"adapter": {
"access_token": "abc123",
"store_url": "http://example.com",
"import_status": "processing",
"store_view_code": "abc123"
}
}
EOF
For details about this request type, see: Create a new store.
